@zonos/elements 1.3.212 → 1.3.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-d04009b9.js → cart-e0b62259.js} +6 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-3a2d4501.js → paypal-93e5de01.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_14.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +14 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +4 -3
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -4
- package/dist/collection/components/store/checkout/cart.js +6 -0
- package/dist/esm/{cart-f36b8065.js → cart-c3540cd7.js} +7 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-4dd540c7.js → paypal-5963c1ab.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +1 -1
- package/dist/esm/zonos-cart-items_14.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +6 -2
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +15 -5
- package/dist/esm-es5/{cart-f36b8065.js → cart-c3540cd7.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-4dd540c7.js → paypal-5963c1ab.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/scripts/index.d.ts +4 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/types/utils/ZonosSettings.d.ts +4 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-0fd105fa.system.entry.js +1 -0
- package/dist/zonos-elements/{p-67da7b6d.entry.js → p-1d0e40b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-dba65101.system.entry.js → p-299efbcf.system.entry.js} +1 -1
- package/dist/zonos-elements/p-41ec9531.entry.js +1 -0
- package/dist/zonos-elements/{p-3464e486.system.entry.js → p-6c69c5fa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8b57a34d.entry.js → p-6d7e45f3.entry.js} +1 -1
- package/dist/zonos-elements/{p-1cc5b4f7.system.entry.js → p-6e8354c1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/p-8d37bb03.entry.js +1 -0
- package/dist/zonos-elements/{p-f0e8e81e.entry.js → p-9004bdda.entry.js} +1 -1
- package/dist/zonos-elements/{p-20584d36.system.js → p-a9b63cdb.system.js} +1 -1
- package/dist/zonos-elements/{p-a9ad60a5.system.entry.js → p-ac784ab8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6aabc2f.system.js → p-adbc4643.system.js} +1 -1
- package/dist/zonos-elements/p-aeae5a7f.entry.js +1 -0
- package/dist/zonos-elements/{p-b0643c40.js → p-c8433f89.js} +1 -1
- package/dist/zonos-elements/{p-002b5c5f.system.entry.js → p-e72b61c1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-23079911.js → p-f979a131.js} +1 -1
- package/dist/zonos-elements/{p-9b2aafa6.system.js → p-fb898c4f.system.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-0595e3f8.entry.js +0 -1
- package/dist/zonos-elements/p-1ed7c17d.system.entry.js +0 -1
- package/dist/zonos-elements/p-24a5352e.entry.js +0 -1
- package/dist/zonos-elements/p-a4efb55c.entry.js +0 -1
|
@@ -1969,6 +1969,12 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
1969
1969
|
* For some service levels, the landed cost that's DAP and we do remittance on behalf of the merchant, these landed cost should be treated as DDP
|
|
1970
1970
|
*/
|
|
1971
1971
|
const cartStoreGetMethod = (landedCost) => {
|
|
1972
|
+
var _a, _b, _c;
|
|
1973
|
+
// If the landed cost is DAP and the country is domestic, then treat it as DDP since no duty or fee is due at the door
|
|
1974
|
+
if (landedCost.method === 'DAP' &&
|
|
1975
|
+
((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US'))) {
|
|
1976
|
+
return 'DDP';
|
|
1977
|
+
}
|
|
1972
1978
|
if (landedCost.method === 'DAP' &&
|
|
1973
1979
|
landedCost.remittance.length &&
|
|
1974
1980
|
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -132,7 +132,7 @@ const getZonosQaUrl = () => {
|
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
134
134
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
135
|
-
const cdnUrl = "https://v1.3.
|
|
135
|
+
const cdnUrl = "https://v1.3.214.js.zonos.com";
|
|
136
136
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
137
137
|
if (!qaUrl &&
|
|
138
138
|
(cdnUrl.includes('test.') ||
|
|
@@ -375,10 +375,10 @@ const zonosLoadUrl = (() => {
|
|
|
375
375
|
}
|
|
376
376
|
return null;
|
|
377
377
|
})();
|
|
378
|
-
const ZONOS_URL = "https://v1.3.
|
|
379
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
380
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
381
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
378
|
+
const ZONOS_URL = "https://v1.3.214.js.zonos.com";
|
|
379
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.214";
|
|
380
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.214";
|
|
381
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.214";
|
|
382
382
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
383
383
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
384
384
|
class Zonos {
|
|
@@ -396,7 +396,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
396
396
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
397
397
|
: null;
|
|
398
398
|
Zonos.isBigCommerce = false;
|
|
399
|
-
Zonos.releaseDate = "
|
|
399
|
+
Zonos.releaseDate = "1749479724498";
|
|
400
400
|
Zonos.isLegacyCheckout = false;
|
|
401
401
|
Zonos.domain = typeof window !== 'undefined'
|
|
402
402
|
? // domain that embeds the iframe
|
|
@@ -414,7 +414,7 @@ Zonos.isNpm = true;
|
|
|
414
414
|
Zonos.zonosQaUrl = null;
|
|
415
415
|
Zonos.zonosQaUrlApi = null;
|
|
416
416
|
Zonos.trackEventLogs = [];
|
|
417
|
-
Zonos.version = `v${"1.3.
|
|
417
|
+
Zonos.version = `v${"1.3.214"}`;
|
|
418
418
|
Zonos.modeAlerted = false;
|
|
419
419
|
Zonos.cartData = null;
|
|
420
420
|
Zonos.paypal = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-e0b62259.js');
|
|
5
5
|
const localization = require('./localization-91bcde0e.js');
|
|
6
6
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
7
7
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
6
|
const debounce$1 = require('./debounce-465a4328.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-e0b62259.js');
|
|
9
9
|
const localization = require('./localization-91bcde0e.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
11
11
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-e0b62259.js');
|
|
7
7
|
const localization = require('./localization-91bcde0e.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const paypal = require('./paypal-3a2d4501.js');
|
|
10
9
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
10
|
+
const paypal = require('./paypal-93e5de01.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
12
12
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
13
13
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
@@ -1220,9 +1220,9 @@ const ZonosCartSubtotal = class {
|
|
|
1220
1220
|
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cart.cartStore.selectedShippingOption.displayName), cart.cartStore.selectedShippingOptionTransitTime && (index.h("zonos-text", { class: "zonos--caption", type: "caption" }, cart.cartStore.selectedShippingOptionTransitTime))));
|
|
1221
1221
|
};
|
|
1222
1222
|
const renderLandedCost = () => {
|
|
1223
|
-
var _a;
|
|
1223
|
+
var _a, _b, _c;
|
|
1224
1224
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
1225
|
-
if (((_a = cart.stripeStore.stripeAddressEventData) === null ||
|
|
1225
|
+
if ((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = cart.stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
|
|
1226
1226
|
return (index.h(index.Fragment, null, index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Taxes and fees'))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" }, cart.cartStore.dutiesTaxesFees !== null ||
|
|
1227
1227
|
cart.cartStore.dutiesTaxesFeesEstimate !== null
|
|
1228
1228
|
? renderCheckoutCurrency({
|
|
@@ -2679,7 +2679,6 @@ const ZonosCustomerInfo = class {
|
|
|
2679
2679
|
catch (_a) { }
|
|
2680
2680
|
}
|
|
2681
2681
|
componentWillLoad() {
|
|
2682
|
-
this.watchShouldEnabledCustomAddress();
|
|
2683
2682
|
this.storeUnsubscribeList = [
|
|
2684
2683
|
zonosStore.zonosStoreOnChange('genericSettings', () => {
|
|
2685
2684
|
this.genericSettings = zonosStore.zonosStore.genericSettings;
|
|
@@ -2691,6 +2690,7 @@ const ZonosCustomerInfo = class {
|
|
|
2691
2690
|
this.addressFormRenderType = cart.cartStore.addressFormRenderType;
|
|
2692
2691
|
}),
|
|
2693
2692
|
];
|
|
2693
|
+
this.watchShouldEnabledCustomAddress();
|
|
2694
2694
|
}
|
|
2695
2695
|
render() {
|
|
2696
2696
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -2962,11 +2962,11 @@ const ZonosShipping = class {
|
|
|
2962
2962
|
this.continueClicked.emit();
|
|
2963
2963
|
};
|
|
2964
2964
|
this.getLandedCostMethodLabelSuffix = (method) => {
|
|
2965
|
-
var _a;
|
|
2965
|
+
var _a, _b, _c;
|
|
2966
2966
|
switch (true) {
|
|
2967
2967
|
// DAP description for non-US countries only
|
|
2968
2968
|
case method === 'DAP' &&
|
|
2969
|
-
((_a = cart.stripeStore.stripeAddressEventData) === null ||
|
|
2969
|
+
!((_b = (_a = zonosStore.zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = cart.stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')):
|
|
2970
2970
|
return localization.translate(` (Duties due at door)`);
|
|
2971
2971
|
default:
|
|
2972
2972
|
return '';
|
|
@@ -3056,7 +3056,6 @@ const ZonosShipping = class {
|
|
|
3056
3056
|
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
3057
3057
|
}
|
|
3058
3058
|
componentWillLoad() {
|
|
3059
|
-
void this.preselectFirstShippingMethod();
|
|
3060
3059
|
this.storeUnsubscribeList = [
|
|
3061
3060
|
cart.cartStoreOnChange('shippingData', () => {
|
|
3062
3061
|
if (this.isOutdatedShippingData()) {
|
|
@@ -3071,6 +3070,7 @@ const ZonosShipping = class {
|
|
|
3071
3070
|
}
|
|
3072
3071
|
}),
|
|
3073
3072
|
];
|
|
3073
|
+
void this.preselectFirstShippingMethod();
|
|
3074
3074
|
}
|
|
3075
3075
|
render() {
|
|
3076
3076
|
// re-init service levels if the currency is toggled
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-e0b62259.js');
|
|
7
|
+
const paypal = require('./paypal-93e5de01.js');
|
|
8
8
|
const localization = require('./localization-91bcde0e.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
@@ -1299,6 +1299,8 @@ const ZonosCheckout = class {
|
|
|
1299
1299
|
const customerAddress1 = getParam('customerAddress1');
|
|
1300
1300
|
const customerAddress2 = getParam('customerAddress2');
|
|
1301
1301
|
const customerName = getParam('customerName');
|
|
1302
|
+
const customerFirstName = getParam('customerFirstName');
|
|
1303
|
+
const customerLastName = getParam('customerLastName');
|
|
1302
1304
|
const customerPhone = getParam('customerPhone');
|
|
1303
1305
|
const customerZip = getParam('customerZip');
|
|
1304
1306
|
const customerState = getParam('customerState');
|
|
@@ -1308,6 +1310,8 @@ const ZonosCheckout = class {
|
|
|
1308
1310
|
customerCity,
|
|
1309
1311
|
customerCountry,
|
|
1310
1312
|
customerEmail,
|
|
1313
|
+
customerFirstName,
|
|
1314
|
+
customerLastName,
|
|
1311
1315
|
customerName,
|
|
1312
1316
|
customerPhone,
|
|
1313
1317
|
customerState,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-e0b62259.js');
|
|
7
7
|
const localization = require('./localization-91bcde0e.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
9
9
|
const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
|
|
@@ -6,10 +6,10 @@ const index = require('./index-1c710d00.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
9
|
-
const cart = require('./cart-
|
|
9
|
+
const cart = require('./cart-e0b62259.js');
|
|
10
10
|
const localization = require('./localization-91bcde0e.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-7cf3752e.js');
|
|
12
|
-
const paypal = require('./paypal-
|
|
12
|
+
const paypal = require('./paypal-93e5de01.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
require('./isDarkColor-428965f4.js');
|
|
15
15
|
|
|
@@ -135,6 +135,11 @@ const ZonosHelloDialog = class {
|
|
|
135
135
|
};
|
|
136
136
|
this.getDutyMessage = () => {
|
|
137
137
|
const countryLandedCost = localization.localizationStore.countryLandedCost;
|
|
138
|
+
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that duties will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
139
|
+
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
140
|
+
(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode) === 'GB') {
|
|
141
|
+
return localization.translate('Duties will apply to all orders.');
|
|
142
|
+
}
|
|
138
143
|
// Our Robby API spells deminimis wrong here
|
|
139
144
|
const dutyDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.dutyDeminimus)
|
|
140
145
|
? localization.currencyFormat({ amount: countryLandedCost.dutyDeminimus })
|
|
@@ -148,6 +153,11 @@ const ZonosHelloDialog = class {
|
|
|
148
153
|
};
|
|
149
154
|
this.getTaxMessage = () => {
|
|
150
155
|
const { countryLandedCost } = localization.localizationStore;
|
|
156
|
+
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that taxes will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
157
|
+
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
158
|
+
(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode) === 'GB') {
|
|
159
|
+
return localization.translate('Taxes will apply to all orders.');
|
|
160
|
+
}
|
|
151
161
|
// Our Robby API spells deminimis wrong here
|
|
152
162
|
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
153
163
|
? localization.currencyFormat({ amount: countryLandedCost.vatTaxDeminimus })
|
|
@@ -337,18 +347,18 @@ const ZonosHelloDialog = class {
|
|
|
337
347
|
const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
|
|
338
348
|
const currentPage = this.getCurrentPageEnum();
|
|
339
349
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
340
|
-
return (index.h(index.Host, { key: '
|
|
350
|
+
return (index.h(index.Host, { key: '048945538b24e429425ba47f0964a2c16a8c2d3d', class: "zonos--elements" }, index.h("div", { key: '539cb35da5f85ec64a166757eb09389262232d3e', class: classes.classes([
|
|
341
351
|
'zonos--hello-dialog',
|
|
342
352
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
343
353
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
344
354
|
!!this.mobileLocationOverride &&
|
|
345
355
|
'zonos--hello-dialog-mobile-override',
|
|
346
356
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
347
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: '
|
|
357
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: 'ef1ad9355d3244d96971217311f1c674adeb6ee3' }, index.h("div", { key: '463e7752c0a1c11c6c86bf0dd8031b81511c0c14', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: '89c1ae9d62c5b6c21472597c1afc5733a1cb8512', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { key: '2657decc4b955f00eeb360018791e18a7a4ac70a', spacing: 24 }, index.h("zonos-country-flag", { key: '57e9c4bdfc7a14e0268097a5c0c79ef508011347', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: 'cda79b1e8487d72ed6ca33e2298731953ad9620e', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: '17d98d8f62d953c2b41ee46678ae4bea26b09ca5', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: '856cebfb2d0d34a52d23f3eb8ccc7a64ef16e822', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: '905f5e46a8eba8d9ff69af0ee5f51dadd168878e', spacing: 8 }, this.restrictedItems.map(item => {
|
|
348
358
|
var _a;
|
|
349
359
|
return item && (index.h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (index.h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
350
|
-
}), index.h("zonos-card", { key: '
|
|
351
|
-
additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), index.h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '
|
|
360
|
+
}), index.h("zonos-card", { key: '600e71f5ccd6f2f86d5fe00833f480b5059fa145', spacing: "12px" }, index.h("zonos-v-stack", { key: '75cc0236d7f59ef08e7700ef326c079b2eb273a2', spacing: 12 }, hasInclusivePrices ? (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), index.h("zonos-text", null, inclusivePriceMessage))) : (index.h(index.Fragment, null, dutyDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), index.h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), index.h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage))))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
361
|
+
additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), index.h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '70c60065a548ab2e178df64062991b8160d62f55', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: '14da13080459253ab355f60f67216f99741b69a2' }, index.h("zonos-country-select", { key: 'e18e90eb0e68450ceb833aa999f24108fd154eb8', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: '56255cb5629ee7600378d13ee700adf1d3c73f51' }, index.h("zonos-language-select", { key: '3d74f4c28c067ea9f94da2d3274abf4d750bcab7', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
352
362
|
}
|
|
353
363
|
static get assetsDirs() { return ["assets"]; }
|
|
354
364
|
static get watchers() { return {
|
|
@@ -2,6 +2,7 @@ import { Fragment, h, Host } from "@stencil/core";
|
|
|
2
2
|
import { cartStore, cartStoreHasOneEligibleItem, } from "../../../store/checkout/cart";
|
|
3
3
|
import { stripeStore, stripeStoreApplyPromoCode, stripeStoreRemovePromoCode, } from "../../../store/checkout/stripe";
|
|
4
4
|
import { translate } from "../../../store/translationStore";
|
|
5
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
5
6
|
import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
|
|
6
7
|
export class ZonosCartSubtotal {
|
|
7
8
|
constructor() {
|
|
@@ -46,9 +47,9 @@ export class ZonosCartSubtotal {
|
|
|
46
47
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cartStore.selectedShippingOption.displayName), cartStore.selectedShippingOptionTransitTime && (h("zonos-text", { class: "zonos--caption", type: "caption" }, cartStore.selectedShippingOptionTransitTime))));
|
|
47
48
|
};
|
|
48
49
|
const renderLandedCost = () => {
|
|
49
|
-
var _a;
|
|
50
|
+
var _a, _b, _c;
|
|
50
51
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
51
|
-
if (((_a =
|
|
52
|
+
if ((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
|
|
52
53
|
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
|
|
53
54
|
cartStore.dutiesTaxesFeesEstimate !== null
|
|
54
55
|
? renderCheckoutCurrency({
|
|
@@ -898,6 +898,8 @@ export class ZonosCheckout {
|
|
|
898
898
|
const customerAddress1 = getParam('customerAddress1');
|
|
899
899
|
const customerAddress2 = getParam('customerAddress2');
|
|
900
900
|
const customerName = getParam('customerName');
|
|
901
|
+
const customerFirstName = getParam('customerFirstName');
|
|
902
|
+
const customerLastName = getParam('customerLastName');
|
|
901
903
|
const customerPhone = getParam('customerPhone');
|
|
902
904
|
const customerZip = getParam('customerZip');
|
|
903
905
|
const customerState = getParam('customerState');
|
|
@@ -907,6 +909,8 @@ export class ZonosCheckout {
|
|
|
907
909
|
customerCity,
|
|
908
910
|
customerCountry,
|
|
909
911
|
customerEmail,
|
|
912
|
+
customerFirstName,
|
|
913
|
+
customerLastName,
|
|
910
914
|
customerName,
|
|
911
915
|
customerPhone,
|
|
912
916
|
customerState,
|
|
@@ -341,7 +341,6 @@ export class ZonosCustomerInfo {
|
|
|
341
341
|
catch (_a) { }
|
|
342
342
|
}
|
|
343
343
|
componentWillLoad() {
|
|
344
|
-
this.watchShouldEnabledCustomAddress();
|
|
345
344
|
this.storeUnsubscribeList = [
|
|
346
345
|
zonosStoreOnChange('genericSettings', () => {
|
|
347
346
|
this.genericSettings = zonosStore.genericSettings;
|
|
@@ -353,6 +352,7 @@ export class ZonosCustomerInfo {
|
|
|
353
352
|
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
354
353
|
}),
|
|
355
354
|
];
|
|
355
|
+
this.watchShouldEnabledCustomAddress();
|
|
356
356
|
}
|
|
357
357
|
render() {
|
|
358
358
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -3,6 +3,7 @@ import { cartStore, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartSto
|
|
|
3
3
|
import { stripeStore, stripeStoreAsyncAddressUpdate, } from "../../../store/checkout/stripe";
|
|
4
4
|
import { storageStore } from "../../../store/storageStore";
|
|
5
5
|
import { translate } from "../../../store/translationStore";
|
|
6
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
6
7
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
7
8
|
import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
|
|
8
9
|
import { sortServiceLevelOptionsByAmount } from "../../../utils/checkout/sortServiceLevelOptionsByAmount";
|
|
@@ -89,11 +90,11 @@ export class ZonosShipping {
|
|
|
89
90
|
this.continueClicked.emit();
|
|
90
91
|
};
|
|
91
92
|
this.getLandedCostMethodLabelSuffix = (method) => {
|
|
92
|
-
var _a;
|
|
93
|
+
var _a, _b, _c;
|
|
93
94
|
switch (true) {
|
|
94
95
|
// DAP description for non-US countries only
|
|
95
96
|
case method === 'DAP' &&
|
|
96
|
-
((_a =
|
|
97
|
+
!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')):
|
|
97
98
|
return translate(` (Duties due at door)`);
|
|
98
99
|
default:
|
|
99
100
|
return '';
|
|
@@ -183,7 +184,6 @@ export class ZonosShipping {
|
|
|
183
184
|
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
184
185
|
}
|
|
185
186
|
componentWillLoad() {
|
|
186
|
-
void this.preselectFirstShippingMethod();
|
|
187
187
|
this.storeUnsubscribeList = [
|
|
188
188
|
cartStoreOnChange('shippingData', () => {
|
|
189
189
|
if (this.isOutdatedShippingData()) {
|
|
@@ -198,6 +198,7 @@ export class ZonosShipping {
|
|
|
198
198
|
}
|
|
199
199
|
}),
|
|
200
200
|
];
|
|
201
|
+
void this.preselectFirstShippingMethod();
|
|
201
202
|
}
|
|
202
203
|
render() {
|
|
203
204
|
// re-init service levels if the currency is toggled
|
|
@@ -96,6 +96,11 @@ export class ZonosHelloDialog {
|
|
|
96
96
|
};
|
|
97
97
|
this.getDutyMessage = () => {
|
|
98
98
|
const countryLandedCost = localizationStore.countryLandedCost;
|
|
99
|
+
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that duties will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
100
|
+
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
101
|
+
(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode) === 'GB') {
|
|
102
|
+
return translate('Duties will apply to all orders.');
|
|
103
|
+
}
|
|
99
104
|
// Our Robby API spells deminimis wrong here
|
|
100
105
|
const dutyDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.dutyDeminimus)
|
|
101
106
|
? currencyFormat({ amount: countryLandedCost.dutyDeminimus })
|
|
@@ -109,6 +114,11 @@ export class ZonosHelloDialog {
|
|
|
109
114
|
};
|
|
110
115
|
this.getTaxMessage = () => {
|
|
111
116
|
const { countryLandedCost } = localizationStore;
|
|
117
|
+
// For GB, if the store doesn't allow low value orders, we would like to tell shopper that taxes will always apply as there would be a custom message saying "Orders to United Kingdom must be over .* to ship."
|
|
118
|
+
if (!(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.allowLowValueOrders) &&
|
|
119
|
+
(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode) === 'GB') {
|
|
120
|
+
return translate('Taxes will apply to all orders.');
|
|
121
|
+
}
|
|
112
122
|
// Our Robby API spells deminimis wrong here
|
|
113
123
|
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
114
124
|
? currencyFormat({ amount: countryLandedCost.vatTaxDeminimus })
|
|
@@ -298,18 +308,18 @@ export class ZonosHelloDialog {
|
|
|
298
308
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
299
309
|
const currentPage = this.getCurrentPageEnum();
|
|
300
310
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
301
|
-
return (h(Host, { key: '
|
|
311
|
+
return (h(Host, { key: '048945538b24e429425ba47f0964a2c16a8c2d3d', class: "zonos--elements" }, h("div", { key: '539cb35da5f85ec64a166757eb09389262232d3e', class: classes([
|
|
302
312
|
'zonos--hello-dialog',
|
|
303
313
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
304
314
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
305
315
|
!!this.mobileLocationOverride &&
|
|
306
316
|
'zonos--hello-dialog-mobile-override',
|
|
307
317
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
308
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
318
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'ef1ad9355d3244d96971217311f1c674adeb6ee3' }, h("div", { key: '463e7752c0a1c11c6c86bf0dd8031b81511c0c14', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '89c1ae9d62c5b6c21472597c1afc5733a1cb8512', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '2657decc4b955f00eeb360018791e18a7a4ac70a', spacing: 24 }, h("zonos-country-flag", { key: '57e9c4bdfc7a14e0268097a5c0c79ef508011347', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'cda79b1e8487d72ed6ca33e2298731953ad9620e', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '17d98d8f62d953c2b41ee46678ae4bea26b09ca5', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '856cebfb2d0d34a52d23f3eb8ccc7a64ef16e822', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '905f5e46a8eba8d9ff69af0ee5f51dadd168878e', spacing: 8 }, this.restrictedItems.map(item => {
|
|
309
319
|
var _a;
|
|
310
320
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
311
|
-
}), h("zonos-card", { key: '
|
|
312
|
-
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '
|
|
321
|
+
}), h("zonos-card", { key: '600e71f5ccd6f2f86d5fe00833f480b5059fa145', spacing: "12px" }, h("zonos-v-stack", { key: '75cc0236d7f59ef08e7700ef326c079b2eb273a2', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, dutyDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage))))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
322
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '70c60065a548ab2e178df64062991b8160d62f55', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '14da13080459253ab355f60f67216f99741b69a2' }, h("zonos-country-select", { key: 'e18e90eb0e68450ceb833aa999f24108fd154eb8', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '56255cb5629ee7600378d13ee700adf1d3c73f51' }, h("zonos-language-select", { key: '3d74f4c28c067ea9f94da2d3274abf4d750bcab7', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
313
323
|
}
|
|
314
324
|
static get is() { return "zonos-hello-dialog"; }
|
|
315
325
|
static get encapsulation() { return "shadow"; }
|
|
@@ -270,6 +270,12 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
270
270
|
* For some service levels, the landed cost that's DAP and we do remittance on behalf of the merchant, these landed cost should be treated as DDP
|
|
271
271
|
*/
|
|
272
272
|
const cartStoreGetMethod = (landedCost) => {
|
|
273
|
+
var _a, _b, _c;
|
|
274
|
+
// If the landed cost is DAP and the country is domestic, then treat it as DDP since no duty or fee is due at the door
|
|
275
|
+
if (landedCost.method === 'DAP' &&
|
|
276
|
+
((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US'))) {
|
|
277
|
+
return 'DDP';
|
|
278
|
+
}
|
|
273
279
|
if (landedCost.method === 'DAP' &&
|
|
274
280
|
landedCost.remittance.length &&
|
|
275
281
|
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
|
@@ -1967,6 +1967,12 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
1967
1967
|
* For some service levels, the landed cost that's DAP and we do remittance on behalf of the merchant, these landed cost should be treated as DDP
|
|
1968
1968
|
*/
|
|
1969
1969
|
const cartStoreGetMethod = (landedCost) => {
|
|
1970
|
+
var _a, _b, _c;
|
|
1971
|
+
// If the landed cost is DAP and the country is domestic, then treat it as DDP since no duty or fee is due at the door
|
|
1972
|
+
if (landedCost.method === 'DAP' &&
|
|
1973
|
+
((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US'))) {
|
|
1974
|
+
return 'DDP';
|
|
1975
|
+
}
|
|
1970
1976
|
if (landedCost.method === 'DAP' &&
|
|
1971
1977
|
landedCost.remittance.length &&
|
|
1972
1978
|
landedCost.landedCostGuaranteeCode === 'ZONOS') {
|
|
@@ -2141,4 +2147,4 @@ const cartStoreResetTabItems = () => {
|
|
|
2141
2147
|
cartStoreResetSelectedShippingOption();
|
|
2142
2148
|
};
|
|
2143
2149
|
|
|
2144
|
-
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreOnChange as G, stripeStoreAsyncAddressUpdate as H, cartStoreUpdateSelectedShippingOption as I, cartStoreGetShippingTransitInfo as J,
|
|
2150
|
+
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreOnChange as G, stripeStoreAsyncAddressUpdate as H, cartStoreUpdateSelectedShippingOption as I, cartStoreGetShippingTransitInfo as J, cartStoreGetMethod as K, sortServiceLevelOptionsByAmount as L, stripeStoreCleanupDomesticShippingSession as a, stripeStoreSaveDomesticShippingSession as b, stripeStore as c, stripeStoreRetrievePayment as d, cartStore as e, cartStoreUpdateItems as f, cartStoreReset as g, cartStoreResetTabItems as h, initStripeElements as i, cartStoreClearCheckoutInterval as j, stripeStoreInitCheckoutSession as k, stripeStoreGetPaymentIntent as l, cartStoreStartCheckoutInterval as m, getCheckoutSessionBody as n, cartStoreUpdateToErrorState as o, cartStoreSetCheckoutSession as p, stripeStorePrefetchLandedCost as q, cartStoreNextStep as r, stripeStoreGetDomesticShippingSession as s, trackConversionEvent as t, stripeStoreUpdateCheckoutSessionBaseCurrency as u, stripeStoreHandleInventoryCheck as v, stripeStoreConfirmPayment as w, stripeStoreHandleInventoryRefund as x, stripeStoreReset as y, validateCheckoutSession as z };
|
package/dist/esm/index.js
CHANGED
|
@@ -129,7 +129,7 @@ const getZonosQaUrl = () => {
|
|
|
129
129
|
return null;
|
|
130
130
|
}
|
|
131
131
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
132
|
-
const cdnUrl = "https://v1.3.
|
|
132
|
+
const cdnUrl = "https://v1.3.214.js.zonos.com";
|
|
133
133
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
134
134
|
if (!qaUrl &&
|
|
135
135
|
(cdnUrl.includes('test.') ||
|
|
@@ -372,10 +372,10 @@ const zonosLoadUrl = (() => {
|
|
|
372
372
|
}
|
|
373
373
|
return null;
|
|
374
374
|
})();
|
|
375
|
-
const ZONOS_URL = "https://v1.3.
|
|
376
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
377
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
378
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
375
|
+
const ZONOS_URL = "https://v1.3.214.js.zonos.com";
|
|
376
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.214";
|
|
377
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.214";
|
|
378
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.214";
|
|
379
379
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
380
380
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
381
381
|
class Zonos {
|
|
@@ -393,7 +393,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
393
393
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
394
394
|
: null;
|
|
395
395
|
Zonos.isBigCommerce = false;
|
|
396
|
-
Zonos.releaseDate = "
|
|
396
|
+
Zonos.releaseDate = "1749479724498";
|
|
397
397
|
Zonos.isLegacyCheckout = false;
|
|
398
398
|
Zonos.domain = typeof window !== 'undefined'
|
|
399
399
|
? // domain that embeds the iframe
|
|
@@ -411,7 +411,7 @@ Zonos.isNpm = true;
|
|
|
411
411
|
Zonos.zonosQaUrl = null;
|
|
412
412
|
Zonos.zonosQaUrlApi = null;
|
|
413
413
|
Zonos.trackEventLogs = [];
|
|
414
|
-
Zonos.version = `v${"1.3.
|
|
414
|
+
Zonos.version = `v${"1.3.214"}`;
|
|
415
415
|
Zonos.modeAlerted = false;
|
|
416
416
|
Zonos.cartData = null;
|
|
417
417
|
Zonos.paypal = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-c456b933.js';
|
|
2
|
-
import { t as trackConversionEvent, z as validateCheckoutSession, c as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-
|
|
2
|
+
import { t as trackConversionEvent, z as validateCheckoutSession, c as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-c3540cd7.js';
|
|
3
3
|
import { t as translate, s as storageStore } from './localization-cf31c728.js';
|
|
4
4
|
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-dd74bbb1.js';
|
|
5
5
|
import { t as tinycolor } from './isDarkColor-1f58b6be.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
2
|
import { d as debounce_1 } from './debounce-c34d1270.js';
|
|
3
3
|
import { d as isObject_1, z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-c456b933.js';
|
|
4
|
-
import { c as stripeStore, t as trackConversionEvent, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-
|
|
4
|
+
import { c as stripeStore, t as trackConversionEvent, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-c3540cd7.js';
|
|
5
5
|
import { s as storageStore, n as storageStoreOnChange, o as getFallbackDefaultCountryCode, t as translate, l as localizationStore } from './localization-cf31c728.js';
|
|
6
6
|
import { b as logError, l as log, i as isCheckoutMobile } from './handleFetch-dd74bbb1.js';
|
|
7
7
|
import { s as shouldRenderTaxIdInput, i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './shouldRenderTaxIdInput-8bc112bb.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, d as getAssetPath, h, H as Host, F as Fragment, c as createEvent, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { e as cartStore, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as cartStoreOnChange, H as stripeStoreAsyncAddressUpdate, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo, K as
|
|
2
|
+
import { e as cartStore, A as cartStoreHasOneEligibleItem, B as stripeStoreApplyPromoCode, C as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, D as stripeStoreResetPromoCode, E as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, F as stripeStoreTranslateAddressToLatin, G as cartStoreOnChange, H as stripeStoreAsyncAddressUpdate, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo, K as cartStoreGetMethod, L as sortServiceLevelOptionsByAmount } from './cart-c3540cd7.js';
|
|
3
3
|
import { d as currencyFormat, t as translate, s as storageStore, l as localizationStore, c as localizationStoreOnChange } from './localization-cf31c728.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-4dd540c7.js';
|
|
6
5
|
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily, h as zonosStoreOnChange } from './zonosStore-c456b933.js';
|
|
6
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-5963c1ab.js';
|
|
7
7
|
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, i as isCheckoutMobile, b as logError, a as getIsStagingMode } from './handleFetch-dd74bbb1.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-87593ff4.js';
|
|
@@ -1216,9 +1216,9 @@ const ZonosCartSubtotal = class {
|
|
|
1216
1216
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, cartStore.selectedShippingOption.displayName), cartStore.selectedShippingOptionTransitTime && (h("zonos-text", { class: "zonos--caption", type: "caption" }, cartStore.selectedShippingOptionTransitTime))));
|
|
1217
1217
|
};
|
|
1218
1218
|
const renderLandedCost = () => {
|
|
1219
|
-
var _a;
|
|
1219
|
+
var _a, _b, _c;
|
|
1220
1220
|
// Domestic US doesn't have duty applied, just taxes and fees
|
|
1221
|
-
if (((_a =
|
|
1221
|
+
if ((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')) {
|
|
1222
1222
|
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Taxes and fees'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null ||
|
|
1223
1223
|
cartStore.dutiesTaxesFeesEstimate !== null
|
|
1224
1224
|
? renderCheckoutCurrency({
|
|
@@ -2675,7 +2675,6 @@ const ZonosCustomerInfo = class {
|
|
|
2675
2675
|
catch (_a) { }
|
|
2676
2676
|
}
|
|
2677
2677
|
componentWillLoad() {
|
|
2678
|
-
this.watchShouldEnabledCustomAddress();
|
|
2679
2678
|
this.storeUnsubscribeList = [
|
|
2680
2679
|
zonosStoreOnChange('genericSettings', () => {
|
|
2681
2680
|
this.genericSettings = zonosStore.genericSettings;
|
|
@@ -2687,6 +2686,7 @@ const ZonosCustomerInfo = class {
|
|
|
2687
2686
|
this.addressFormRenderType = cartStore.addressFormRenderType;
|
|
2688
2687
|
}),
|
|
2689
2688
|
];
|
|
2689
|
+
this.watchShouldEnabledCustomAddress();
|
|
2690
2690
|
}
|
|
2691
2691
|
render() {
|
|
2692
2692
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -2958,11 +2958,11 @@ const ZonosShipping = class {
|
|
|
2958
2958
|
this.continueClicked.emit();
|
|
2959
2959
|
};
|
|
2960
2960
|
this.getLandedCostMethodLabelSuffix = (method) => {
|
|
2961
|
-
var _a;
|
|
2961
|
+
var _a, _b, _c;
|
|
2962
2962
|
switch (true) {
|
|
2963
2963
|
// DAP description for non-US countries only
|
|
2964
2964
|
case method === 'DAP' &&
|
|
2965
|
-
((_a =
|
|
2965
|
+
!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.domesticCountries) === null || _b === void 0 ? void 0 : _b.includes(((_c = stripeStore.stripeAddressEventData) === null || _c === void 0 ? void 0 : _c.value.address.country) || 'US')):
|
|
2966
2966
|
return translate(` (Duties due at door)`);
|
|
2967
2967
|
default:
|
|
2968
2968
|
return '';
|
|
@@ -3052,7 +3052,6 @@ const ZonosShipping = class {
|
|
|
3052
3052
|
this.storeUnsubscribeList.forEach(subscription => subscription());
|
|
3053
3053
|
}
|
|
3054
3054
|
componentWillLoad() {
|
|
3055
|
-
void this.preselectFirstShippingMethod();
|
|
3056
3055
|
this.storeUnsubscribeList = [
|
|
3057
3056
|
cartStoreOnChange('shippingData', () => {
|
|
3058
3057
|
if (this.isOutdatedShippingData()) {
|
|
@@ -3067,6 +3066,7 @@ const ZonosShipping = class {
|
|
|
3067
3066
|
}
|
|
3068
3067
|
}),
|
|
3069
3068
|
];
|
|
3069
|
+
void this.preselectFirstShippingMethod();
|
|
3070
3070
|
}
|
|
3071
3071
|
render() {
|
|
3072
3072
|
// re-init service levels if the currency is toggled
|